const path = require('path')

function resolve (dir) {
  return path.join(__dirname, dir)
}

process.env.VUE_APP_VERSION = process.env.BUILD_NUMBER || '-'

// noinspection JSUnusedGlobalSymbols
module.exports = {
  chainWebpack: config => {
    config.resolve.alias
      .set('@', resolve('src')) // 设置路径别名
      .set('@img', resolve('src/assets/img'))
      .set('@pages', resolve('src/views/pages')) // 设置路径别名
      .set('@router', resolve('src/router'))
      .set('@store', resolve('src/store'))
      .set('@utils', resolve('src/utils'))
  },
  devServer: {
    port: 8000
  },
  publicPath: process.env.VUE_APP_BASE_PATH || '/' // 系统路径
}
